Conversation
chore(docs): untrack project-local design notes
fix(docs): restore harness-dag.md tracking, ignore only personal notes
dev/main 不再维护 DAG 参考模板(权威源为 opencode-dag-config 仓库)。 每次 release 时 package-templates job clone 配置仓库并打包 dag-templates.tar.gz 作为 release 资产附带;只读操作,不写主仓库。 dag-flow.txt 改为指引 workflow library 两级 scope(全局优先、项目覆盖)。
日常更新全局参考模板走 zip 下载(无需 git/SSH): 预演分类(NEW/UNCHANGED/UPDATE)→ 无冲突直接合并, 覆盖同名文件前备份并 QA 决策。与 release 完全解耦。
- workflows.ts: add builtin scope (compiled-in templates) as third resolution tier after project/global; list/resolve cover it - generate.ts/build.ts: inject OPENCODE_DAG_TEMPLATES from DAG_TEMPLATES_DIR so release binaries ship curated templates for air-gapped installs - workflow.ts: read builtin specs from the injected map (no backing file) - release-fork.yml: build-cli downloads the packaged templates artifact and feeds DAG_TEMPLATES_DIR; package-templates guards empty glob - dag-template-update.txt: concurrency lock, backup-failure abort, content-based verification - remove tracked .opencode/workflows templates (config repo is the sole source; builtin + global scopes cover runtime)
- guard OPENCODE_DAG_TEMPLATES with typeof check so bare source/test runs don't throw ReferenceError (mirrors OPENCODE_MODELS_DEV); add fallback parse tolerance for malformed builtin specs - dedupe Entry interface, extract builtinEntry/builtinName, share parseMeta - list/resolve not-found hints include builtin scope when present - drop stale change-review test (repo no longer ships templates) - release-fork: skip cp on empty template glob; drop redundant dag-templates artifact re-download in release job
Project-scope workflow library (.opencode/workflows): review-oriented one-off topologies derived from the deep-review-dag-module reference (perf, complexity, subsystem reviews). Deep-review session artifacts (.opencode/.dag-specs): one-off specs and persisted reviewer/verifier outputs for the PR#167 and joint-diff review rounds (admission briefs, manifests, gate results, final audit report) — kept as the evidence trail for the remediation decisions.
The Extract Templates step wrote the Git Bash path form of $GITHUB_WORKSPACE/dag-templates-src into GITHUB_ENV without the `cygpath -m` conversion that the models.dev step in the same job applies, so the native bun consumer in script/generate.ts would receive an unresolvable path on windows-latest. Mirror the models.dev pattern. Also make generate.ts fail loudly with a contextual error when DAG_TEMPLATES_DIR is set but missing (points at the offending value and the likely cause), instead of a bare glob/IO error. Confirmed by the final-confirmation review arbiter (sole HIGH; all other findings explicitly deferred).
Persist the dag.node.failed trigger as workflow_node.error_class and expose it on every agent-visible surface: status output, wake node-line suffix and failed-workflow attribution digest, httpapi NodeResponse, SDK. Failure-triage guidance for the parent agent: per-class response table (timeout/exec_failed/verdict_fail), cascade detection shapes (skipped terminalization with paused nuance; Dependency-interpolation shape), orchestrator_unresponsive zero-attribution recipe, continuation-workflow recovery for terminal failures. Budget declaration calls out that verifier/aggregator lanes need 20-30 minutes, not the fan-out default. Tests: projector persistence, status output, wake digest attribution, cancelled-node null invariant, recovery classes, paused required-failure terminalization, httpapi error_class on-the-wire fixture.
…tool registration Restore the /goal feature faithfully from the pre-retirement baseline (826bf59), adapted to the current architecture: - Goal state service: goal_state table, load/set/pause/resume/clear/ markDone/subgoals, goal.updated/goal.cleared events - GoalLoop: idle-driven continuation with judge, kick dispatch, turn budget/pause semantics, crash-safe fiber lifecycle - /goal + /subgoal slash dispatch in session prompt (early return before command registry), goal tool (status/complete) in the tool registry - System prompt injection: static mechanism + live goal-state block, wired on BOTH composition systems (Goal.defaultLayer + Goal.node in SystemPrompt deps) - HTTP API session.goal (404 when goalless, contract-honest null-free 200), SDK Goal types + client method, TUI sidebar widget + sync reducer/hydration, httpapi-exercise goal + goal-less scenarios - Session cleanup on remove; GOAL/SUBGOAL command entries Tests: restored goal suites, new session-level dispatch tests (set+kick, status, subgoal, Goal-absent fallthrough), TUI sync-goal reducer tests. All gates green: 471 opencode tests, 227 httpapi scenarios, typecheck across packages.
…biter verdicts Evidence trail for the closing audit rounds: final-confirmation specs (monolithic + split continuation), persisted lane outputs (config-repo review, stack integrity, 9/9 gates), and the arbiter LOOP verdict that drove the cygpath HIGH fix.
- dag-flow.txt: reference templates resolve by NAME through three scopes
(project > global > builtin) instead of hardcoded project paths; the four
curated topologies may be absent in bare dev checkouts — explicit
compose-fresh fallback
- bootstrap.ts: clarify GoalLoop bootstrap wiring (BootstrapLayer inclusion
is serviceOption availability only; no bootstrap caller inits it; memoMap
dedups) — resolves the comment-vs-wiring contradiction
- prompt.ts: dedupe goal/subgoal dispatch user-message construction shared
by the error and success branches
- goal/{loop,judge,prompts}.ts: drop opaque internal task-id markers (D5,
D4.x) from comments, keep the semantic content
…wiring The comment claimed optionality as if Goal were generally absent; make the two-tier reality explicit — SystemPrompt.layer stays buildable without Goal (bare test harnesses, degraded note) while production compositions always provide it (defaultLayer + LayerNode deps), so the goal block renders.
…re triage, three-tier library) - Drop the obsolete 'goal auto-loop is gone' statement; document the restored /goal + /subgoal feature in a dedicated section (commands, judge loop + turn budget, goal tool self-complete, system-prompt live block, TUI widget, GET /session/:id/goal 404 contract, durability) - Reference topologies now ship via the global scope (opencode-dag-config) and a builtin tier in release binaries; workflow library table gains the builtin row, resolution order, and /dag-template-update sync description - Document node failure triage: failure classes surfaced on status/wake with attribution digest, driving targeted repair instead of restart - Remove the stale change-review.yaml doc link (file no longer tracked); keep the built-in skill wording scope-accurate
Clear 28 mechanical warnings introduced by the /goal restoration (redundant Number() conversions on already-number-typed GoalState fields, unnecessary status literal cast, unnecessary type-argument defaults, unused test imports, unknown-in-template-literal). Remaining 23 net-new (no-misused- spread on intentional plain-object conversion + no-unsafe-type-assertion in test mocks) match existing repo-wide idioms counted in the ratchet; the ceiling moves 4711 -> 4734 accordingly.
…fig-repo templates (#172) Unified release: three bundles (error_class failure observability + triage guidance, /goal module restoration with state management and tool registration, config-repo template system with Windows cygpath fix) consolidated from the closed #169/#170/#171. Reviewed through three deep-review rounds + final-confirmation audit + closeout PASS + two-axis Standards/Spec review + README alignment + lint ratchet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dev → main 正式版门禁。
包含 #172 全部内容(三束统一版本):
dev CI 全绿(Typecheck + 全量测试),release 预发布二进制已在 macOS/Linux/Windows 冒烟通过 + 7 项边界测试无 bug。
评审链:三轮深度评审(round 1-3)+ 终审确认(9/9 门禁)+ 收尾审计 PASS + 双轴 Standards/Spec review + README 对齐 + lint ratchet。